const fs = require('fs')
const inquirer = require('inquirer')
const chalk = require('chalk')
const figlet = require('figlet')
const clear = require('clear')


clear()

console.log(figlet.textSync('laipz', {
  font: 'isometric3',
  horizontalLayout: 'fitted',
  verticalLayout: 'full',
  width: 100,
  whitespaceBreak: true
}));

inquirer.prompt([{
  type: 'list',
  message: '请输入您接下来的操作:',
  name: 'method',
  choices: [
    "创建新模块",
    "创建新菜单",
    "创建新tabs栏",
    "退出",
  ]
}]).then(answers => {
  if (answers.method == "创建新模块") {
    require('./module.js')()
  }
  if (answers.method == "创建新菜单") {
    require('./menu.js')()
  }
  if (answers.method == "创建新tabs栏") {
    require('./page.js')()
  }
  if (answers.method == "退出") {
    console.log(chalk.bold.blue('退出创建操作'))
  }
})

